package com.lin.springbootinit.manager;

import com.lin.springbootinit.vert.MainVerticle;
import io.vertx.core.Verticle;
import io.vertx.core.Vertx;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

@Component
public class VertManager {
    @Resource
    private CacheManager cacheManager;

    @PostConstruct
    public void init(){
        Vertx vertx = Vertx.vertx();
        Verticle mainVerticle = new MainVerticle(cacheManager);
        vertx.deployVerticle(mainVerticle);
    }
}
